﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cricket.LinqModel
{
    public partial class Series
    {
        private IDataRepository _dataObject;
        public Series(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            _dataObject.CreateSeries(this);
        }
        public List<Series> GetAllSeries()
        {
            return _dataObject.GetAllSeries();
        }
        public void DeleteSeries()
        {
            _dataObject.DeleteSeries(this);
        }
        public void GetSeriesById()
        {
            _dataObject.GetSeriesById(this);
        }
        public void UpdateSeries()
        {
            _dataObject.UpdateSeries(this);
        }
        public List<Series> CheckSeriesNameExist(int SeriesId, string teamName)
        {
            return _dataObject.CheckSeriesNameExist(SeriesId, teamName);
        }
        public List<Series> CheckSeriesAbbrivationExist(int TeamId, string abbrivation)
        {
            return _dataObject.CheckSeriesAbbrivationExist(TeamId, abbrivation);
        }
    }
}
